﻿
using GisSharpBlog.NetTopologySuite.IO;

namespace AzukiMap.MapSource
{
    public class ShapeGeometryTypeConverter
    {
        public static VectorSourceTypes GetVectorSourceType(ShapeGeometryType sgType)
        {
            switch (sgType)
            {
                case ShapeGeometryType.Point:
                    return VectorSourceTypes.Point;
                case ShapeGeometryType.LineString:
                    // shape lineString is always multi.
                    return VectorSourceTypes.MultiLineString;
                case ShapeGeometryType.Polygon:
                    // shape polygon is always multi.
                    return VectorSourceTypes.MultiPolygon;
                case ShapeGeometryType.MultiPoint:
                    return VectorSourceTypes.MultiPoint;

                default:
                    return VectorSourceTypes.NotSupported;
            }
        }
    }

    public enum VectorSourceTypes
    {
        Point = 0,
        LineString,
        Polygon,
        MultiPoint,
        MultiLineString,
        MultiPolygon,
        GeometryCollection,
        NotSupported,
    }
}
